<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">  
		<style type="text/css">
			img{
				width: 100px;
			}
		</style>
	</head>
	<body>
		购物车
		
						<table class="table table-bordered">
	<caption>边框表格布局</caption>
	<thead>
		<tr>
			<th>物品</th>
			<th>图片</th>
			<th>立即购买</th>
		</tr>
	</thead>
	<tbody>


	</tbody>
</table>
		
	</body>
	<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var gwc = localStorage.getItem("gwc");
		var data = JSON.parse(gwc);
		console.log(data);
		
		for (var i=0;i<data.length;i++) {
			var img = data[i].pict_url;
			var title = data[i].title;
			var item_url = data[i].item_url;
			var str = `
					<tr>
						<td>${title}</td>
						<td>
							<img src = "${img}"/>
						</td>
						<td>
							<a href="${item_url}">立即购买</a>
						</td>
					</tr>
			`;
			$("tbody").append(str);
		}
		
		
	</script>
</html>
